package cc.comac.mom.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

import cc.comac.mom.api.EquipParamService;
import cc.comac.mom.bean.EquipParam;
import cc.comac.mom.datahandlers.entity.EquipParamDataHandler;
import cc.comac.mom.entity.EquipParamEntity;
import cc.comac.mom.util.ResultBean;
@Service
@RestController
public class EquipParamServiceImpl implements EquipParamService{
	@Autowired
	private EquipParamDataHandler equipParamDataHandle;
	@Override
	public ResultBean insert(@RequestBody EquipParam equipParam) {
		ResultBean resultBean = new ResultBean(true);
		int insert = equipParamDataHandle.insert(equipParam);
		resultBean.setObject(insert);
		return resultBean;
	}

	@Override
	public ResultBean update(@RequestBody EquipParam equipParam) {
		ResultBean resultBean = new ResultBean(true);
		int update = equipParamDataHandle.update(equipParam);
		resultBean.setObject(update);
		return resultBean;
	}

	@Override
	public ResultBean batchDelete(@RequestBody List<EquipParam> equipParam) {
		ResultBean resultBean = new ResultBean(true);
		int batchDelete = equipParamDataHandle.batchDelete(equipParam);
		resultBean.setObject(batchDelete);
		return resultBean;
	}

	@Override
	public EquipParam selectAllByPage(@RequestBody EquipParam equipParam) {
		EquipParam selectAllByPage = equipParamDataHandle.selectAllByPage(equipParam);
		return selectAllByPage;
	}

	@Override
	public List<EquipParamEntity> selectAll() {
		return equipParamDataHandle.selectAll();
	}

	
}
